#ifndef __FLASH_H
#define __FLASH_H

#include "pstorage.h"
#define SYS_BLOCK_NUM 1
#define RECORD_BLOCK_NUM 1
#define SYS_STORE_SIZE  32
#define RECORD_STORE_SIZE 640

#define SYS_BUFF_NUM  20


extern uint32_t status_flag;
extern void Init_flash(void);
extern void register_flash(void);
void sys_clear_flash(void);
void record_clear_flash(void);
void sys_load_flash(uint8_t block_num,uint8_t offset,uint8_t *flash_data,uint16_t size);
void record_load_flash(uint8_t block_num,uint8_t offset,uint8_t *flash_data,uint16_t size);
void sys_info_update(uint8_t block_num,uint8_t offset,uint8_t *flash_data,uint16_t size);
void record_info_update(uint8_t block_num,uint8_t offset,uint8_t *flash_data,uint16_t size);
void vtooth_flash_init(void);
#endif



